package com.ymatou.iapi.trading.userquery.parameter.resp;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 支付信息
 */
public class PaymentInfo  {


    /**
     * 订单总价
     */
    private BigDecimal totalPrice;



    /**
     * 订单运费
     */
    private BigDecimal freight;


    /**
     * 订单金额
     */
    private BigDecimal earnest;


    /**
     * 应补款金额
     */
    private BigDecimal needPostpayAmount;


    /**
     * 补款时使用的红包数量
     */
    private BigDecimal giftUsedAmountOfPostpay;


    /**
     * 使用红包数量
     */
    private BigDecimal useGiftAmount;


    /**
     * 是否全款支付
     */
    private boolean paidInFull;


    /**
     * 卖家优惠券码
     */
    private String sellerCouponCode;


    /**
     * 卖家优惠券使用额度
     */
    private BigDecimal sellerCouponAmount;


    /**
     * 最后可付款时间
     */
    private Date lastPayTime;

    //----------------------------


    /**
     * 首付款金额
     */
    private BigDecimal firstPay;


    /**
     * 平台优惠券码
     */
    private String couponCode;


    /**
     * 平台优惠券金额
     */
    private BigDecimal couponValue;


    /**
     * 补款红包金额
     */
    private BigDecimal postPaidAmountOfGift;


    /**
     * 实际补款金额
     */
    private BigDecimal realPostPay;


    /**
     * 实际支付金额
     */
    private BigDecimal realPay;


    /**
     * 原始尾款金额(未经调整)
     */
    private BigDecimal originalPostpayAmount;


    /**
     * 订单总定金
     */
    private BigDecimal totalEarnest;


    /**
     * 实际需支付的尾款金额(卖家修改后)
     */
    private BigDecimal actualPostpayAmount;


    /**
     * 当前待付尾款金额(根据卖家调整会发生相应变化)
     */
    private BigDecimal expectedPostpayAmount;


    /**
     * 应收金额. 定金+ 实际需支付的尾款金额
     */
    private BigDecimal expectedPayAmount;


    /**
     * 交易号(非尾款)
     */
    private int tradingId;


    /**
     * 退款退货金额
     */
    private BigDecimal salesRefundAmount;

    //------------------------------\\


    /**
     * 调价
     */
    private BigDecimal totalPriceChange;


    /**
     * 尾款调整差价. 尾款调低时为负数
     */
    private BigDecimal postpayPriceChange;


    /**
     * 是否只需付款一次
     */
    private boolean onlyNeedPayOnce;

    /**
     * 优惠活动金额
     */
    private BigDecimal promotionReducedAmount;


    /**
     * 支付明细
     */
    private PaymentDetail detail;

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getFreight() {
        return freight;
    }

    public void setFreight(BigDecimal freight) {
        this.freight = freight;
    }

    public BigDecimal getEarnest() {
        return earnest;
    }

    public void setEarnest(BigDecimal earnest) {
        this.earnest = earnest;
    }

    public BigDecimal getNeedPostpayAmount() {
        return needPostpayAmount;
    }

    public void setNeedPostpayAmount(BigDecimal needPostpayAmount) {
        this.needPostpayAmount = needPostpayAmount;
    }

    public BigDecimal getGiftUsedAmountOfPostpay() {
    	if (null==giftUsedAmountOfPostpay ){
    		return BigDecimal.ZERO;    		
    	}
    	else {
    		 return giftUsedAmountOfPostpay;
		}     
    }

    public void setGiftUsedAmountOfPostpay(BigDecimal giftUsedAmountOfPostpay) {
        this.giftUsedAmountOfPostpay = giftUsedAmountOfPostpay;
    }

    public BigDecimal getUseGiftAmount() {
        return useGiftAmount;
    }

    public void setUseGiftAmount(BigDecimal useGiftAmount) {
        this.useGiftAmount = useGiftAmount;
    }

    public boolean getPaidInFull() {
        return paidInFull;
    }

    public void setPaidInFull(boolean paidInFull) {
        this.paidInFull = paidInFull;
    }

    public String getSellerCouponCode() {
        return sellerCouponCode;
    }

    public void setSellerCouponCode(String sellerCouponCode) {
        this.sellerCouponCode = sellerCouponCode;
    }

    public BigDecimal getSellerCouponAmount() {
        return sellerCouponAmount;
    }

    public void setSellerCouponAmount(BigDecimal sellerCouponAmount) {
        this.sellerCouponAmount = sellerCouponAmount;
    }

    public Date getLastPayTime() {
        return lastPayTime;
    }

    public void setLastPayTime(Date lastPayTime) {
        this.lastPayTime = lastPayTime;
    }

    public BigDecimal getFirstPay() {
        return firstPay;
    }

    public void setFirstPay(BigDecimal firstPay) {
        this.firstPay = firstPay;
    }

    public String getCouponCode() {
        return couponCode;
    }

    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    public BigDecimal getCouponValue() {
        return couponValue;
    }

    public void setCouponValue(BigDecimal couponValue) {
        this.couponValue = couponValue;
    }

    public BigDecimal getPostPaidAmountOfGift() {
        return postPaidAmountOfGift;
    }

    public void setPostPaidAmountOfGift(BigDecimal postPaidAmountOfGift) {
        this.postPaidAmountOfGift = postPaidAmountOfGift;
    }

    public BigDecimal getRealPostPay() {
        return realPostPay;
    }

    public void setRealPostPay(BigDecimal realPostPay) {
        this.realPostPay = realPostPay;
    }

    public BigDecimal getRealPay() {
        return realPay;
    }

    public void setRealPay(BigDecimal realPay) {
        this.realPay = realPay;
    }

    public BigDecimal getOriginalPostpayAmount() {
        return originalPostpayAmount;
    }

    public void setOriginalPostpayAmount(BigDecimal originalPostpayAmount) {
        this.originalPostpayAmount = originalPostpayAmount;
    }

    public BigDecimal getTotalEarnest() {
        return totalEarnest;
    }

    public void setTotalEarnest(BigDecimal totalEarnest) {
        this.totalEarnest = totalEarnest;
    }

    public BigDecimal getActualPostpayAmount() {
        return actualPostpayAmount;
    }

    public void setActualPostpayAmount(BigDecimal actualPostpayAmount) {
        this.actualPostpayAmount = actualPostpayAmount;
    }

    public BigDecimal getExpectedPostpayAmount() {
        return expectedPostpayAmount;
    }

    public void setExpectedPostpayAmount(BigDecimal expectedPostpayAmount) {
        this.expectedPostpayAmount = expectedPostpayAmount;
    }

    public BigDecimal getExpectedPayAmount() {
        return expectedPayAmount;
    }

    public void setExpectedPayAmount(BigDecimal expectedPayAmount) {
        this.expectedPayAmount = expectedPayAmount;
    }

    public int getTradingId() {
        return tradingId;
    }

    public void setTradingId(int tradingId) {
        this.tradingId = tradingId;
    }

    public BigDecimal getSalesRefundAmount() {
        return salesRefundAmount;
    }

    public void setSalesRefundAmount(BigDecimal salesRefundAmount) {
        this.salesRefundAmount = salesRefundAmount;
    }

    public BigDecimal getTotalPriceChange() {
        return totalPriceChange;
    }

    public void setTotalPriceChange(BigDecimal totalPriceChange) {
        this.totalPriceChange = totalPriceChange;
    }

    public BigDecimal getPostpayPriceChange() {
        return postpayPriceChange;
    }

    public void setPostpayPriceChange(BigDecimal postpayPriceChange) {
        this.postpayPriceChange = postpayPriceChange;
    }

    public boolean getOnlyNeedPayOnce() {
        return onlyNeedPayOnce;
    }

    public void setOnlyNeedPayOnce(boolean onlyNeedPayOnce) {
        this.onlyNeedPayOnce = onlyNeedPayOnce;
    }

    public PaymentDetail getDetail() {
        return detail;
    }

    public void setDetail(PaymentDetail detail) {
        this.detail = detail;
    }

    public BigDecimal getPromotionReducedAmount() {
        return promotionReducedAmount;
    }

    public void setPromotionReducedAmount(BigDecimal promotionReducedAmount) {
        this.promotionReducedAmount = promotionReducedAmount;
    }
}
